# coding: utf-8

# 一、元组的新增：通过把两个元组拼接起来
tuple1 = (123, 456, 789)
tuple2 = ("abc", "def", "ghi")
tuple3 = tuple1 + tuple2
print(tuple3)  # (123, 456, 789, 'abc', 'def', 'ghi')

# 二、元组的删除
del tuple3  # 删除tuple3
# print(tuple3)  # 报错 删除后就不能访问了

# 三、元组的查找
# 1.元组的切片
movieTuple = ["机器人总动员", "驯龙高手", "恋恋笔记本", "飞屋环游记", "Remember Me"]
cutTuple = movieTuple[1:5:2]  # 区间[1,5)，步进值2
print(cutTuple)  # ['驯龙高手', '飞屋环游记']
